//
// Created by 张一帆 on 2020/4/12.
//
#include <bits/stdc++.h>
#include<bits/stdc++.h>
#include <iostream>
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/time.h>

namespace fastIO {
#define BUF_SIZE 100000
#define OUT_SIZE 100000
#define ll long long
    bool IOerror = 0;

    inline char nc() {
        static char buf[BUF_SIZE], *p1 = buf + BUF_SIZE, *pend = buf + BUF_SIZE;
        if (p1 == pend) {
            p1 = buf;
            pend = buf + fread(buf, 1, BUF_SIZE, stdin);
            if (pend == p1) {
                IOerror = 1;
                return -1;
            }
        }
        return *p1++;
    }

    inline bool blank(char ch) { return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t'; }

    inline bool read(int &x) {
        bool sign = 0;
        char ch = nc();
        x = 0;
        for (; blank(ch); ch = nc());
        if (IOerror)return false;
        if (ch == EOF) return false;
        if (ch == '-')sign = 1, ch = nc();
        for (; ch >= '0' && ch <= '9'; ch = nc())x = x * 10 + ch - '0';
        if (sign)x = -x;
        return true;
    }

    struct Ostream_fwrite {
        char *buf, *p1, *pend;

        Ostream_fwrite() {
            buf = new char[BUF_SIZE];
            p1 = buf;
            pend = buf + BUF_SIZE;
        }

        void out(char ch) {
            if (p1 == pend) {
                fwrite(buf, 1, BUF_SIZE, stdout);
                p1 = buf;
            }
            *p1++ = ch;
        }

        void print(int x) {
            static char s[15], *s1;
            s1 = s;
            if (!x)*s1++ = '0';
            if (x < 0)out('-'), x = -x;
            while (x)*s1++ = x % 10 + '0', x /= 10;
            while (s1-- != s)out(*s1);
        }

        void print(char *s) { while (*s)out(*s++); }

        void println(char *s) {
            while (*s)out(*s++);
            out('\n');
        }

        void flush() {
            if (p1 != buf) {
                fwrite(buf, 1, p1 - buf, stdout);
                p1 = buf;
            }
        }

        ~Ostream_fwrite() { flush(); }
    } Ostream;

    inline void print(int x) { Ostream.print(x); }

    inline void print(char x) { Ostream.out(x); }

    inline void println(int x) {
        Ostream.print(x);
        Ostream.out('\n');
    }

    inline void printd(int x) {
        Ostream.print(x);
        Ostream.out(',');
    }

    inline void println(char x) {
        Ostream.out(x);
        Ostream.out('\n');
    }

    inline void print(char *s) { Ostream.print(s); }

    inline void println(char *s) { Ostream.println(s); }

#undef ll
#undef OUT_SIZE
#undef BUF_SIZE
};
using namespace fastIO;
using namespace std;
#define ll long long
#define ull unsigned long long
void prtime(string pos, timeval &time) {
    printf("%s=", pos.c_str());
    struct timeval now;
    gettimeofday(&now, NULL);
    printf("%dms\n", int((now.tv_sec * 1000 + now.tv_usec / 1000) - (time.tv_sec * 1000 + time.tv_usec / 1000)));
    time = now;
}

long long n = 1000000;

inline int check(ll x, ll y) {
    y = y * 2;
    return y >= x && y <= 3 * x;
}

inline int check1(int x, int y) {
    y = y * 2;
    return y >= x && y <= 3 * x;
}
inline int check2(ull x, ull y) {
    y = y * 2;
    return y >= x && y <= 3 * x;
}
string my(long long a){
    if(a==0)return "0";
    string tmp="";
    while(a){
        tmp+=(a%10);
        a/=10;
    }
    reverse(tmp.begin(),tmp.end());
    return tmp;
}


int main() {
    timeval s;
    gettimeofday(&s, NULL);
    for(int i=1;i<=n;++i)to_string(n);
    prtime("00", s);
    for(int i=1;i<=n;i++)my(n);
    prtime("00",s);
    return 0;
}
